Page({

  /**
   * 页面的初始数据
   */
  data: {
    goodsListData: [{
      id: 1,
      imgUrls: ["../image/travel/travel4.jpg"],
      goodprice: 1000,
      goodTitle: "安康景区-安山-七日游",
      goodDetails: ""
    }, {
      id: 2,
      imgUrls: ["../image/travel/travel2.jpg"],
      goodprice: 2000,
      goodTitle: "安康景区-长桥-五日游",
      goodDetails: ""
    }, {
      id: 3,
      imgUrls: ["../image/travel/travel1.jpg"],
      goodprice: 1500,
      goodTitle: "安康景区-西湖-七日游",
      goodDetails: ""
    },
    {
      id: 4,
      imgUrls: ["https://tse1-mm.cn.bing.net/th/id/R-C.541d315de4b11e79e0bcb84f35ccf30b?rik=V96LdUGfUZJu5g&riu=http%3a%2f%2fimage.qianye88.com%2fpic%2f812f74e3a664e1c2b1e0e8cde0480e8c&ehk=o55Cw49jjhzmX%2bO%2fvYRXQsoMo3R%2f%2fuXTqpx%2bM88E63M%3d&risl=&pid=ImgRaw&r=0"],
      goodprice: 1000,
      goodTitle: "安康景区-蓝州-三日游",
      goodDetails: ""
    }, {
      id: 5,
      imgUrls: ["https://tr-osdcp.qunarzz.com/tr-osd-tr-manager/img/62c6fba19f122c4aaabbac763d0c84c1.jpg"],
      goodprice: 2000,
      goodTitle: "安康景区-弥红-七日游",
      goodDetails: ""
    }, {
      id: 6,
      imgUrls: ["https://tse1-mm.cn.bing.net/th/id/R-C.b71f0b7e18392012b3bf1a83e6369b8b?rik=CI4CHHGBBYaZIw&riu=http%3a%2f%2fimage.qianye88.com%2fpic%2f478bc3c8432f57cb3c41b0c7207db9a2&ehk=rdTpcs3e%2bWalRh2gXUCdEm5C4ihS67Y0osHxvEvGJ3g%3d&risl=&pid=ImgRaw&r=0"],
      goodprice: 1500,
      goodTitle: "安康景区-大桥-1日游",
      goodDetails: ""
    }
  ] //商品详情
  },

  // 搜索
  // 关键字
  keywords(e) {
    this.search(e.detail.value)
  },
  search(val) {
    // 搜索展示
  },
  // 跳转详情页
  navgoodsDetails(e) {
    // console.log(e.currentTarget.dataset.name.id)
    // 传入商品id
    wx.navigateTo({
      url: '../goodsDetails/goodsDetails?goodsId=' + e.currentTarget.dataset.name.id,
    })
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {

  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {

  }
})